<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
	var person=new Object(); 
	person.name="张三";//创建属性以及初始化 
	person.age=23; 
	//或var person={  name:"张三",age:23};//看起来，很像json对象{"name":"张三", "age":"23"}
	
	document.write(typeof  person +"<br/>"); 
	document.write(typeof  person.name +"<br/>"); 
	document.write(typeof  person.age +"<br/>"); 
	document.write(person.name+"<br/>"); 
	document.write(person.age+"<br/>");
	
	var box=[1,2,3,4];

	document.write(box);//输出,,,4,,6,,,, 

	document.write(typeof  box +"<br/>"); 
	
	var xx;
	document.write(typeof  document.getElementById('notExistElement') +"xx<br/>"); 
	
	var str="The rain in Spain falls mainly in the plain";
	var strlen=str.length;
	var strindexof=str.indexOf("in");


	var strarray=str.split(" ");
	var strvalueof=strarray.valueOf();
	alert(strvalueof);
	
	alert(parseInt("4")+parseInt("10"));
	
	var Perimeter=getPerimeterCircle(1);
	var  Area=getAreaCircle(1);
	function getPerimeterCircle(r){
//	    var pi=Math.PI;
//	    var perimeter=2*pi*r;
//	    return perimeter;
	    return 2*Math.PI*r;
	}
	function getAreaCircle(r){
//	    var pi=Math.PI;
//	    var area=pi*Math.pow(r,2);
//	    return area;
	    return Math.PI*Math.pow(r,2);
	}
	console.log(Perimeter);
	console.log(Area);
	
	var jsondata='{"name":"liyi"}';
	var jsondata2="aaa";
	//var obj=JSON.parse(jsondata2);
	
	alert("obj is:"+jsondata2);


	

</script>
</head>
<body>
end

</body>
</html>